home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / os2 / adept106.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1995-12-22  |  17KB  |  557 lines

  1. /* Begin Install.CMD for AdeptXBBS */
  2. '@Echo off'
  3. adummy = ''
  4. say ''
  5. say ''
  6. say 'If you are not a registered sysop this version of the software will'
  7. say 'run in a timed 1 node evaluation mode.  This version of the BBS'
  8. say 'software will run until March 31st, 1995.  If you are a registered'
  9. say 'sysop the timer will not effect you.'
  10. say ''
  11. dummy = charout(,'Do you wish to continue with this install? [y/N] ')
  12. parse upper pull adummy
  13. if left(adummy,1) \= 'Y' then do
  14.   exit
  15. end
  16. adummy = ''
  17. say ''
  18. say ''
  19. say ''
  20. say ''
  21. say 'Please... Make sure Chatserver.exe is NOT loaded!  If it is this install'
  22. say '          will fail without warning.  Please make sure that Gatekpr.exe'
  23. say '          is also not running, or any other adeptxbbs utilities.'
  24. say ''
  25. dummy = charout(,'Do you wish to continue with this install? [y/N] ')
  26. parse upper pull adummy
  27. if left(adummy,1) \= 'Y' then do
  28.   exit
  29. end
  30. say ''
  31. say ''
  32. say '  Thank you for Choosing AdeptSoft - BBS: (407) 477-6310, AdeptSoft.Com'
  33. say ''
  34. say '   ──────────────────────────────────────────────────────────'
  35. say 'C──────────────────────────────────────────────────────────'
  36. say 'C▌    ▐C────────────────────────────────────────────────────────'
  37. say 'C▐C▐C▌  ▐C▌   ▐C▌    ▐C▌    ▐C▌   ▐C▌   ▐C▌   ▐C▌    '
  38. say 'C▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C'
  39. say 'C▌    ▐C▐C▐C▌ ▐C▌    ▐C▐C▌ ▐C▐C▐C▌ ▐C▐C'
  40. say 'C▐C ▐C▐C▐C▐C▐C▐C▐C▐C▐C▐C'
  41. say 'C▐C ▐C▌  ▐C▌   ▐C▐C▐C▌    ▐C▌   ▐C▐C'
  42. say 'C▐C ▐C───────────────────────────────────────────────────────'
  43. say 'C──────────────────────────────────────────────────────────'
  44. say '   ──────────────────────────────────────────────────────────'
  45. say ''
  46. say ''
  47. say ''
  48. say ''
  49. say ''
  50. say ''
  51. store = charout(,'Press Enter to continue...')
  52. parse upper pull enterd
  53. say ''
  54. say ''
  55. say 'C┌───────────────────────────────────────────────────────────────────┐'
  56. say 'C│            AdeptXBBS 1.06 Installation/Update Program             '
  57. say 'C│   AdeptXBBS is copyright (c) 1995 by AdeptSoft & Mark Kimes       │'
  58. say 'C│                        All rights reserved                        │'
  59. say 'C└───────────────────────────────────────────────────────────────────┘'
  60. say ''
  61. say ''
  62.  
  63. rc = stream('adeptins.dat','c','query exists')
  64. if rc = '' then
  65. do
  66.   say 'Sorry, ADEPTINS.DAT not found.  Must not be right directory. Terminating.'
  67.   exit
  68. end
  69.  
  70. rc = stream('adeptful.dat','c','query exists')
  71. if rc = '' then
  72. do
  73.   say 'Sorry, ADEPTFUL.DAT not found.  Must not be right directory. Terminating.'
  74.   exit
  75. end
  76.  
  77. curdir = directory()
  78.  
  79. do
  80.     say ''
  81.     say 'Please enter the drive letter to install AdeptXBBS (Ex. C:)'
  82.     say 'You MUST enter the full drive letter, C: <- Notice the colon'
  83.     say '--'
  84.     parse upper pull dummy
  85.     ADDRESS CMD dummy
  86.     ADDRESS CMD "CD\"
  87.     ADDRESS CMD "MD ADEPT 2>NUL"
  88.     ADDRESS CMD "CD ADEPT"
  89.     olddir = curdir
  90.     curdir = dummy'\ADEPT'
  91.     say ''
  92.     say 'Current sub-directory: 'curdir
  93.     say ''
  94.     say 'Install AdeptXBBS into the current'
  95.     dum = charout(, 'sub-directory? [Y/n] ')
  96.     parse upper pull dummy
  97.     if left(dummy,1) = 'N' then exit
  98.     say ''
  99. end
  100.  
  101. say ''
  102. say 'Installing AdeptXBBS, copying files.. Please wait...'
  103.  
  104. InsCmd = copy olddir'\*>NUL'
  105.  
  106. if olddir \= curdir then
  107. do
  108.   ADDRESS CMD InsCmd
  109. end
  110.  
  111. say ''
  112. say '1. Install a Full Copy of AdeptXBBS'
  113. say '2. Upgrade a previous version of AdeptXBBS'
  114. say ''
  115. say '3. Quit'
  116. parse upper pull dummy
  117. if left(dummy,1) = '3' then exit
  118.  
  119. say ''
  120. say 'Unpacking files, this may take a bit...'
  121.  
  122. if left(dummy,1) = '1' then
  123. do
  124.   InsCmd = 'AdeptFul.dat /o >NUL'
  125.   ADDRESS CMD InsCmd
  126.   InsCmd = 'AdpLang.dat /o >NUL'
  127.   ADDRESS CMD InsCmd
  128.   InsCmd = 'AdpMenus.dat /o >NUL'
  129.   ADDRESS CMD InsCmd
  130. end
  131.  
  132. InsCmd = 'AdeptIns.dat /o >NUL'
  133. ADDRESS CMD InsCmd
  134.  
  135. if left(dummy,1) \= 1 then do
  136.     say ''
  137.     say 'If your LANGUAGE.TEXT is customized you may not want to overwrite'
  138.     say 'it.'
  139.     say ''
  140.     dum = Charout(, 'Is it OK to Overwrite your Language.Text? [Y/n] ')
  141.     parse upper pull adummy
  142.     if left(adummy,1) \= 'N' then do
  143.        say ''
  144.        say 'Overwriting your Language.Text file...'
  145.        InsCmd = 'AdpLang.dat /o >NUL'
  146.        ADDRESS CMD InsCmd
  147.     end
  148. end
  149.  
  150. if left(dummy,1) \= 1 then do
  151.     say ''
  152.     say 'Would you like to replace your current menus with the latest menus'
  153.     say 'included with v1.0?'
  154.     say ''
  155.     dum = Charout(, 'Would you like your menus replaced? [Y/n] ')
  156.     parse upper pull adummy
  157.     if left(adummy,1) \= 'N' then do
  158.        say ''
  159.        say 'Replacing menu files...'
  160.        InsCmd = 'AdpMenus.dat /o >NUL'
  161.        ADDRESS CMD InsCmd
  162.     end
  163. end
  164.  
  165. rc = stream('System\Language.Text.Index','c','query exists')
  166. if rc \= '' then
  167. do
  168.   ADDRESS CMD 'DEL System\Language.Text.Index'
  169. end
  170.  
  171. rc = stream('System\Language.Text.Compiled','c','query exists')
  172. if rc \= '' then
  173. do
  174.   ADDRESS CMD 'DEL System\Language.Text.Compiled'
  175. end
  176.  
  177. /* load rexx utility functions */
  178.  
  179. rc = stream('adept.exe','c','query exists')
  180. if rc = '' then
  181. do
  182.   say 'Sorry, ADEPT.EXE not found.  Must not be right directory. Terminating.'
  183.   exit
  184. end
  185.  
  186. say ''
  187. say 'If you see any SYS### errors from this point on, please ignore them'
  188. say ''
  189.  
  190. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  191. call SysLoadFuncs
  192.  
  193. /* say it, then do it */
  194.  
  195. say "Creating AdeptSoft folder..."
  196.  
  197. /* first, create AdeptSoft folder */
  198.  
  199. title = "AdeptSoft"
  200. classname = 'WPFolder'
  201. location = '<WP_DESKTOP>'
  202. setup = 'OBJECTID=<AdeptSoft_Folder>;OPEN=DEFAULT'
  203. result=SysCreateObject(classname,title,location,setup,f)
  204.  
  205. /* If folder exists, ask before updating */
  206.  
  207. if result = 0 then
  208. do
  209.   existed = 'TRUE'
  210.   say ''
  211.   say 'The AdeptXBBS folder already exists.'
  212.   dum = Charout(, 'Do you really want to create a duplicate? [Y/n] ')
  213.   parse upper pull dummy
  214.   if left(dummy,1) = 'N' then
  215.   do
  216.     rc = stream('adept.exe','c','query exists')
  217.     if rc = '' then
  218.     do
  219.       say 'Sorry, ADEPT.EXE not found.  Unarchive does not appear to have '
  220.       say 'been successful.'
  221.       exit
  222.     end
  223.  
  224.     do
  225.       say ''
  226.       say 'Install appears to have been sucessful!'
  227.       say ''
  228.     end
  229.  
  230.     do
  231.       say ''
  232.       say 'NOTE: This setup defaults to starting in 'DEMO' mode, enless you are'
  233.       say '      upgrading, and have already registered the program.  If you are'
  234.       say '      a registered sysop and your key has been entered in the'
  235.       say '      Config->Register AdeptXBBS box, you will automatically startup'
  236.       say '      with the features you registered accessable to you. '
  237.       say ''
  238.       say ''
  239.       say '      If you are not a registered sysop this version of the software will'
  240.       say '      run in a timed 1 node evaluation mode.  This version of the BBS'
  241.       say '      software will run under March 31st, 1995.  If you are a registered'
  242.       say '      sysop the timer will not effect you.'
  243.       say ''
  244.       say ''
  245.       say '      If the BBS software beeps twice and then exists when you first try'
  246.       say '      to run it, read the file wontwork.txt. - thanks.'
  247.       say ''
  248.       say 'Would you like to setup your copy of'
  249.       dum = Charout(, 'AdeptXBBS? ')
  250.       parse upper pull dummy
  251.       if left(dummy,1) = 'Y' then
  252.       do
  253.         ADDRESS CMD 'Adept.exe /NODES 2 /SETUP'
  254.       end
  255.       say ''
  256.     end
  257.     say 'Thank you for choosing AdeptSoft!'
  258.     say ''
  259.     ADDRESS CMD "DEL ADPMENUS.DAT"
  260.     ADDRESS CMD "DEL ADPLANG.DAT"
  261.     ADDRESS CMD "DEL ADEPTINS.DAT"
  262.     ADDRESS CMD "DEL ADEPTFUL.DAT"
  263.     exit
  264.   end
  265.   say ''
  266. end
  267.  
  268. say "Creating objects in AdeptSoft folder..."
  269.  
  270. /* now, create program objects in AdeptSoft folder */
  271.  
  272. title = "AdeptXBBS 1 Node"
  273. classname = 'WPProgram'
  274. location = '<AdeptSoft_Folder>'
  275. setup = 'EXENAME='curdir'\ADEPT.EXE;STARTUPDIR='curdir';PARAMETERS=/NODES 1'
  276. call SysCreateObject classname,title,location,setup,u
  277.  
  278. title = "AdeptXBBS 2 Nodes"
  279. classname = 'WPProgram'
  280. location = '<AdeptSoft_Folder>'
  281. setup = 'EXENAME='curdir'\ADEPT.EXE;STARTUPDIR='curdir';PARAMETERS=/NODES 2'
  282. call SysCreateObject classname,title,location,setup,u
  283.  
  284. title = "AdeptXBBS in Setup Mode"
  285. classname = 'WPProgram'
  286. location = '<AdeptSoft_Folder>'
  287. setup = 'EXENAME='curdir'\ADEPT.EXE;STARTUPDIR='curdir';PARAMETERS=/NODES 2 /SETUP'
  288. call SysCreateObject classname,title,location,setup,u
  289.  
  290. rc = stream('xsend.cmd','c','query exists')
  291. if rc \= '' then
  292. do
  293.   title = "Send files"
  294.   classname = 'WPProgram'
  295.   location = '<AdeptSoft_Folder>'
  296.   setup = 'EXENAME='curdir'\XSEND.CMD;STARTUPDIR='curdir
  297.   if existed = '' then setup = setup';PARAMETERS=%* 'curdir'\\'
  298.   call SysCreateObject classname,title,location,setup,u
  299. end
  300.  
  301. rc = stream('fileedit.exe','c','query exists')
  302. if rc \= '' then
  303. do
  304.   title = "File area editor"
  305.   classname = 'WPProgram'
  306.   location = '<AdeptSoft_Folder>'
  307.   setup = 'EXENAME='curdir'\FILEEDIT.EXE;STARTUPDIR='curdir
  308.   call SysCreateObject classname,title,location,setup,u
  309. end
  310.  
  311. rc = stream('mail.cmd','c','query exists')
  312. if rc \= '' then
  313. do
  314.   title = "Process mail"
  315.   classname = 'WPProgram'
  316.   location = '<AdeptSoft_Folder>'
  317.   setup = 'EXENAME='curdir'\mail.cmd;STARTUPDIR='curdir
  318.   call SysCreateObject classname,title,location,setup,u
  319. end
  320.  
  321. rc = stream('reindexfiles.exe','c','query exists')
  322. if rc \= '' then
  323. do
  324.   title = "Reindex File Database"
  325.   classname = 'WPProgram'
  326.   location = '<AdeptSoft_Folder>'
  327.   setup = 'EXENAME='curdir'\ReIndexFiles.EXE;STARTUPDIR='curdir';PARAMETERS=/NUKE'
  328.   call SysCreateObject classname,title,location,setup,u
  329. end
  330.  
  331. rc = stream('reindexusers.exe','c','query exists')
  332. if rc \= '' then
  333. do
  334.   title = "Reindex User File"
  335.   classname = 'WPProgram'
  336.   location = '<AdeptSoft_Folder>'
  337. setup = 'EXENAME='curdir'\ReIndexUsers.Exe;STARTUPDIR='curdir
  338. call SysCreateObject classname,title,location,setup,u
  339. end
  340.  
  341. rc = stream('bfsmake.exe','c','query exists')
  342. if rc \= '' then
  343. do
  344.   title = "Convert file areas"
  345.   classname = 'WPProgram'
  346.   location = '<AdeptSoft_Folder>'
  347.   setup = 'EXENAME='curdir'\BFSMAKE.EXE;STARTUPDIR='curdir
  348.   call SysCreateObject classname,title,location,setup,u
  349. end
  350.  
  351. rc = stream('xmsg.cmd','c','query exists')
  352. if rc \= '' then
  353. do
  354.   title = "Clean up msg areas"
  355.   classname = 'WPProgram'
  356.   location = '<AdeptSoft_Folder>'
  357.   setup = 'EXENAME='curdir'\CLEAN.EXE;STARTUPDIR='curdir
  358.   call SysCreateObject classname,title,location,setup,u
  359. end
  360.  
  361. rc = stream('README.NOW','c','query exists')
  362. if rc \= '' then
  363. do
  364.   title = "Must Read!"
  365.   classname = 'WPShadow'
  366.   location = '<AdeptSoft_Folder>'
  367.   setup = 'SHADOWID='rc
  368.   call SysCreateObject classname,title,location,setup,u
  369. end
  370.  
  371. rc = stream('AdpXBBS.DOC','c','query exists')
  372. if rc \= '' then
  373. do
  374.   title = "AdeptXBBS Documentation!"
  375.   classname = 'WPShadow'
  376.   location = '<AdeptSoft_Folder>'
  377.   setup = 'SHADOWID='rc
  378.   call SysCreateObject classname,title,location,setup,u
  379. end
  380.  
  381. rc = stream('GATEKPR.DOC','c','query exists')
  382. if rc \= '' then
  383. do
  384.   title = "Gate Keeper Documentation!"
  385.   classname = 'WPShadow'
  386.   location = '<AdeptSoft_Folder>'
  387.   setup = 'SHADOWID='rc
  388.   call SysCreateObject classname,title,location,setup,u
  389. end
  390.  
  391. rc = stream('AdpRexx.DOC','c','query exists')
  392. if rc \= '' then
  393. do
  394.   title = "AdeptREXX Documentation!"
  395.   classname = 'WPShadow'
  396.   location = '<AdeptSoft_Folder>'
  397.   setup = 'SHADOWID='rc
  398.   call SysCreateObject classname,title,location,setup,u
  399. end
  400.  
  401. rc = stream('UserMod.Doc','c','query exists')
  402. if rc \= '' then
  403. do
  404.   title = "Batch User Modifier"
  405.   classname = 'WPShadow'
  406.   location = '<AdeptSoft_Folder>'
  407.   setup = 'SHADOWID='rc
  408.   call SysCreateObject classname,title,location,setup,u
  409. end
  410.  
  411. rc = stream('REGISTER.TXT','c','query exists')
  412. if rc \= '' then
  413. do
  414.   title = "How to Register"
  415.   classname = 'WPShadow'
  416.   location = '<AdeptSoft_Folder>'
  417.   setup = 'SHADOWID='rc
  418.   call SysCreateObject classname,title,location,setup,u
  419. end
  420.  
  421. rc = stream('WONTWORK.TXT','c','query exists')
  422. if rc \= '' then
  423. do
  424.   title = "Possible fix to a bug"
  425.   classname = 'WPShadow'
  426.   location = '<AdeptSoft_Folder>'
  427.   setup = 'SHADOWID='rc
  428.   call SysCreateObject classname,title,location,setup,u
  429. end
  430.  
  431. rc = stream('FAQ12-95.TXT','c','query exists')
  432. if rc \= '' then
  433. do
  434.   title = "AdeptXBBS Frequently Asked Questions"
  435.   classname = 'WPShadow'
  436.   location = '<AdeptSoft_Folder>'
  437.   setup = 'SHADOWID='rc
  438.   call SysCreateObject classname,title,location,setup,u
  439. end
  440.  
  441. rc = stream('BUGFORM.TXT','c','query exists')
  442. if rc \= '' then
  443. do
  444.   title = "AdeptXBBS Bug Report Form"
  445.   classname = 'WPShadow'
  446.   location = '<AdeptSoft_Folder>'
  447.   setup = 'SHADOWID='rc
  448.   call SysCreateObject classname,title,location,setup,u
  449. end
  450.  
  451.   rc = directory('Menus')
  452.   if rc \= '' then
  453.   do
  454.     call directory curdir
  455.     title = "BBS Menus"
  456.     classname = 'WPShadow'
  457.     location = '<AdeptSoft_Folder>'
  458.     setup = 'SHADOWID='rc
  459.     call SysCreateObject classname,title,location,setup,u
  460.   end
  461.  
  462.   rc = directory('Text')
  463.   if rc \= '' then
  464.   do
  465.     call directory curdir
  466.     title = "BBS Text"
  467.     classname = 'WPShadow'
  468.     location = '<AdeptXBBS_Folder>'
  469.     setup = 'SHADOWID='rc
  470.     call SysCreateObject classname,title,location,setup,u
  471.   end
  472.  
  473.   rc = directory('System\SysNews')
  474.   if rc \= '' then
  475.   do
  476.     call directory curdir
  477.     title = "BBS System News"
  478.     classname = 'WPShadow'
  479.     location = '<AdeptSoft_Folder>'
  480.     setup = 'SHADOWID='rc
  481.     call SysCreateObject classname,title,location,setup,u
  482.   end
  483.  
  484.   rc = directory('System\MiscNews')
  485.   if rc \= '' then
  486.   do
  487.     call directory curdir
  488.     title = "BBS Misc. News"
  489.     classname = 'WPShadow'
  490.     location = '<AdeptSoft_Folder>'
  491.     setup = 'SHADOWID='rc
  492.     call SysCreateObject classname,title,location,setup,u
  493.   end
  494.  
  495. rc = stream('Adept.HLP','c','query exists')
  496. if rc \= '' then
  497. do
  498.   rc = stream('SEEHELP.EXE','c','query exists')
  499.   if rc \= '' then
  500.   do
  501.     title = "AdeptXBBS Online Help"
  502.     classname = 'WPProgram'
  503.     location = '<AdeptSoft_Folder>'
  504.     setup = 'EXENAME='curdir'\SEEHELP.EXE;'
  505.     setup = setup'STARTDIR='curdir';PARAMETERS='curdir'\ADEPT.HLP'
  506.     call SysCreateObject classname,title,location,setup,f
  507.   end
  508. end
  509.  
  510. rc = stream('adept.exe','c','query exists')
  511. if rc = '' then
  512. do
  513.   say 'Sorry, ADEPT.EXE not found.  Unarchive does not appear to have '
  514.   say 'been successful.'
  515.   exit
  516. end
  517.  
  518. do
  519.   say ''
  520.   say 'Install appears to have been sucessful!'
  521.   say ''
  522. end
  523.  
  524. do
  525.   say ''
  526.   say 'NOTE: This setup defaults to starting 2 nodes.  Both nodes will be'
  527.   say '      started in  "'"SETUP"'"  mode.  This is to be sure that it will'
  528.   say '      not interupt anything else that is running.'
  529.   say ''
  530.   say '      You can setup the BBSs options from the Config pull down on'
  531.   say '      the main screen.'
  532.   say ''
  533.   say '      Be sure to click on Shutdown in order to make sure your settings'
  534.   say '      are properly saved.'
  535.   say ''
  536.   say '      If the BBS software beeps twice and then exists when you first try'
  537.   say '      to run it, read the file wontwork.txt - thanks.'
  538.   say ''
  539.   say 'Would you like to setup your copy of'
  540.   dum = Charout(, 'AdeptXBBS? [y/N] ')
  541.   parse upper pull dummy
  542.   if left(dummy,1) = 'Y' then
  543.   do
  544.     ADDRESS CMD 'Adept.exe /NODES 2 /SETUP'
  545.   end
  546.   ADDRESS CMD "DEL ADPMENUS.DAT"
  547.   ADDRESS CMD "DEL ADPLANG.DAT"
  548.   ADDRESS CMD "DEL ADEPTINS.DAT"
  549.   ADDRESS CMD "DEL ADEPTFUL.DAT"
  550.   say ''
  551.  
  552. end
  553.  
  554. say 'Thank you for choosing AdeptSoft!'
  555.  
  556. /* END Install Program */
  557.